
#include "headers/Main.h"

#include "headers/Buffer.h"
#include "headers/Disco.h"
#include "headers/Tracker.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char** argv) {

/*
	 // gettimeofday();

	 char buffer[30];
	 struct timeval tv;

	 time_t curtime,curtime2;

	 gettimeofday(&tv, NULL);
	 curtime=tv.tv_usec;
	 curtime2=tv.tv_sec;
	 // strftime(buffer,30,"%T.",localtime(&curtime));
	 // printf("%s%ld\n",buffer,tv.tv_usec);
	 printf("%ld, %ld\n", tv.tv_sec, tv.tv_usec);
*/

	time_t start, stop;
	clock_t ticks; long count;

	limparArquivoTemporario();

	time(&start);
	Executar();
	time(&stop);

	// printf("\n\nForam utilizados %0.2f segundos de tempo de CPU. \n", (double)ticks/CLOCKS_PER_SEC);
	printf("\nProcessamento finalizado em %.0f segundos. \n ", difftime(stop, start));

	return EXIT_SUCCESS;

}
